//
//  MyTableViewCell3-1.m
//  真·豆瓣半完全体
//
//  Created by dllo on 15/12/31.
//  Copyright © 2015年 lanou3g. All rights reserved.
//

#import "MyTableViewCell3-1.h"

@implementation MyTableViewCell3_1
//@property (nonatomic, retain) UIImageView *imgView;
//@property (nonatomic, retain) UIImageView *imgView2;
//@property (nonatomic, retain) UIImageView *imgView3;
//@property (nonatomic, retain) UIImageView *imgView4;
//@property (nonatomic, retain) UIImageView *imgView5;
//@property (nonatomic, retain) UILabel *nameLabel;
//@property (nonatomic, retain) UILabel *timeLabel;
//@property (nonatomic, retain) UILabel *owner_nameLabel;
//@property (nonatomic, retain) UILabel *category_nameLabel;
//@property (nonatomic, retain) UILabel *addressLabel;
//@property (nonatomic, retain) UILabel *Label;
//@property (nonatomic, retain) UILabel *contentLabel;

- (void)dealloc{
    [_imgView release];
    [_imgView2 release];
    [_imgView3 release];
    [_imgView4 release];
    [_imgView5 release];
    [_nameLabel release];
    [_timeLabel release];
    [_owner_nameLabel release];
    [_category_nameLabel release];
    [_addressLabel release];
    [_Label release];
    [_contentLabel release];
    [super dealloc];
}
- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        [self creatCell];
    }
    return self ;
}
- (void)creatCell{
    self.imgView = [[UIImageView alloc] init];
    [self.contentView addSubview:_imgView];
    [_imgView release];
    
    self.imgView2 = [[UIImageView alloc] init];
    [self.contentView addSubview:_imgView2];
    [_imgView2 release];
    
    self.imgView3 = [[UIImageView alloc] init];
    [self.contentView addSubview:_imgView3];
    [_imgView3 release];
    
    self.imgView4 = [[UIImageView alloc] init];
    [self.contentView addSubview:_imgView4];
    [_imgView4 release];
    
    self.imgView5 = [[UIImageView alloc] init];
    [self.contentView addSubview:_imgView5];
    [_imgView5 release];
    

    
    self.nameLabel = [[UILabel alloc] init];
    [self.contentView addSubview:_nameLabel];
    [_nameLabel release];
    
    self.timeLabel = [[UILabel alloc] init];
    [self.contentView addSubview:_timeLabel];
    [_timeLabel release];
    
    self.owner_nameLabel = [[UILabel alloc] init];
    [self.contentView addSubview:_owner_nameLabel];
    [_owner_nameLabel release];
    
    self.category_nameLabel = [[UILabel alloc] init];
    [self.contentView addSubview:_category_nameLabel];
    [_category_nameLabel release];
    
    self.addressLabel = [[UILabel alloc] init];
    [self.contentView addSubview:_addressLabel];
    [_addressLabel release];
    
    self.Label = [[UILabel alloc] init];
    [self.contentView addSubview:_Label];
    [_Label release];
    
    self.contentLabel = [[UILabel alloc] init];
    [self.contentView addSubview:_contentLabel];
    [_contentLabel release];
    
}
- (void)layoutSubviews{
    [super layoutSubviews];
    _nameLabel.frame = CGRectMake(10, 10, 375, 40);

    
    _imgView.frame = CGRectMake(10 , 50, 100, 140);
    
    _imgView2.frame = CGRectMake(120, 50, 20, 20);
    
    _imgView3.frame = CGRectMake(120, 80, 20, 20);
    
    _imgView4.frame = CGRectMake(120, 110, 20, 20);
    
    _imgView5.frame = CGRectMake(120, 140, 20, 20);
    
    
    
    _timeLabel.frame = CGRectMake(145, 50, 225, 20);
    
    _owner_nameLabel.frame = CGRectMake(145, 80, 200, 20);
    
    _category_nameLabel.frame = CGRectMake(145, 110, 200, 20);
    
    _addressLabel.frame = CGRectMake(145, 140, 200, 50);
    
    _Label.frame = CGRectMake(10, 220, 375, 40);
    
//    _contentLabel.frame = CGRectMake(10, 260, 355, 800);

    NSDictionary *dic = [NSDictionary dictionaryWithObjectsAndKeys:[UIFont systemFontOfSize:17], NSFontAttributeName, nil];
    CGRect rect = [_contentLabel.text boundingRectWithSize:CGSizeMake(375, 0) options:NSStringDrawingUsesLineFragmentOrigin attributes:dic context:nil];
    _contentLabel.frame = CGRectMake(0, 260, 375, rect.size.height);
    _contentLabel.numberOfLines = 80;
}






- (void)awakeFromNib {
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
